<?php
$date = $event->getDate();
$year = substr($date,0,4);
$month = substr($date,5,2);
$day = substr($date,8,2);
$f_date = $day."/".$month."/".$year;
?>
<h1>Editar evento "<?php echo html_entity_decode($event->getTitle()) ?>"</h1>
<?php if($sf_user->hasFlash('msg')){ ?>
<div class="message">
  <?php echo $sf_user->getFlash('msg') ?>
</div>
<br />
<?php } ?>
<form action="<?php echo url_for('@events_edit_save') ?>" method="post" autocomplete="off" onsubmit="return v_frm();">
    <input type="hidden" name="hdId" value="<?php echo $event->getId() ?>" />
<table width="100%" cellpadding="5" cellspacing="5">
  <tr>
    <td>T&iacute;tulo</td>
    <td><textarea name="title"><?php echo $event->getTitle() ?></textarea></td>
  </tr>
  <tr>
    <td>Resumen</td>
    <td><textarea name="summary"><?php echo $event->getSummary() ?></textarea></td>
  </tr
  <tr>
    <td>Contenido</td>
    <td><textarea name="content"><?php echo $event->getContent() ?></textarea></td>
  </tr>
  <tr>
    <td>Fecha de actualizaci&oacute;n de estado</td>
    <td>
        <input type="text" id="date" name="date" value="<?php echo $f_date; ?>" placeholder="25/12/2000" autocomplete="off" />
        <em style="color: red;">Esta fecha sirve para que se actualice el atributo del evento (activo y pasado)</em>
    </td>
  </tr>
  <tr>
    <td colspan="2" align="center">
      <input type="submit" value="Guardar Cambios"/>
    </td>
  </tr>
</table>
</form>
<script type="text/javascript">
function v_frm(){
    var date = $("#date").val();
    if(date==""){
        alert("Ingrese fecha");
        return false;
    }
    return true;
}
</script>